package com.qf.microuser.point.service.impl;

import com.qf.common.core.entity.PointRule;
import com.qf.common.redis.utils.RedisUtil;
import com.qf.microuser.point.mapper.PointRedisMapper;
import com.qf.microuser.point.service.PointRedisService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * --- 缘分让我们相遇乱世以外 ---
 *
 * @author SJY
 * 2024/12/30
 */
@Service
public class PointRedisServiceImpl implements PointRedisService {
    @Resource
    private PointRedisMapper pointRedisMapper;
    @Resource
    private RedisUtil redisUtil;
    @Override
    public void deletePoint() {
        redisUtil.deleteObject("point:rule");
    }

    @Override
    public Integer addPointType(PointRule pointRule) {
        return pointRedisMapper.addPointType(pointRule);
    }
}
